#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
#include <time.h>

int main()
{
	char  *p[100];
	char *a;
	int i=0,b;
	DIR *dir;
	struct dirent *ptr;
	struct stat buf;
	dir = opendir(".");
	while((ptr = readdir(dir)))
	{
		p[i] = ptr->d_name;
		i++;
	}
	b = i;
	for(i=0;i<b;i++)
	{
		if(strcmp(p[i],p[i+1])>0)
		{
			a = p[i];
			p[i] = p[i+1];
			p[i+1] = a;
		}
	}
	for(i=0;i<b;i++)
		printf("%s   ",p[i]);
	printf("\n");
}